package com.example.shushiyunsst.util.push;

import com.alibaba.fastjson.annotation.JSONField;
import com.example.library_common.global.AppGlobals;
import com.example.library_common.preference.Preference;
import com.example.shushiyunsst.R;

import java.io.Serializable;

import static com.example.shushiyunsst.fragment.main.constant.ConstantKt.CURRENT_DEVICE_TOKEN;

public class PushMsgBean implements Serializable {


    /**
     * policy : {"expire_time":"2020-10-22 17:02:41"}
     * description : DFSFDSFDSF
     * production_mode : false
     * appkey : 5f8d2ad880455950e4ae7039
     * payload : {"body":{"title":"FDSFDSFDSFSD","ticker":"FDSFDSFDSFSD","text":"FDSFDSFDSFDSFSDFSDFSDFSDFDSFSDF","after_open":"go_app","play_vibrate":"false","play_lights":"false","play_sound":"true"},"display_type":"notification"}
     * device_tokens : AkadfKQINUPm7JGX7ngzo35IVB4KCy25Agca1fQcObiA
     * type : unicast
     * timestamp : 1603157226778
     */

    @JSONField(name = "policy")
    private PolicyBean policy = new PolicyBean();

    @JSONField(name = "description")
    private String description;

    @JSONField(name = "production_mode")
    private boolean productionMode = false;

    @JSONField(name = "appkey")
    private String appkey = AppGlobals.getApplication().getString(R.string.m_app_push_key);

    @JSONField(name = "payload")
    private PayloadBean payload = new PayloadBean();

    @JSONField(name = "device_tokens")
    private String deviceTokens = Preference.Companion.getHOLDER().getCustomAppProfile(CURRENT_DEVICE_TOKEN);

    @JSONField(name = "type")
    private String type ="unicast";

    @JSONField(name = "timestamp")
    private String timestamp;

    public PolicyBean getPolicy() {
        return policy;
    }

    public void setPolicy(PolicyBean policy) {
        this.policy = policy;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public boolean isProductionMode() {
        return productionMode;
    }

    public void setProductionMode(boolean productionMode) {
        this.productionMode = productionMode;
    }

    public String getAppkey() {
        return appkey;
    }

    public void setAppkey(String appkey) {
        this.appkey = appkey;
    }

    public PayloadBean getPayload() {
        return payload;
    }

    public void setPayload(PayloadBean payload) {
        this.payload = payload;
    }

    public String getDeviceTokens() {
        return deviceTokens;
    }

    public void setDeviceTokens(String deviceTokens) {
        this.deviceTokens = deviceTokens;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(String timestamp) {
        this.timestamp = timestamp;
    }


}
